fix: did exchange multiuse invites respond in kind #2850
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #2817
DID Exchange was responding incorrectly to requests, sending unqualified DIDs with a
did_rotate~attach
(which is nonsensical). This fixes it to only send adid_rotate~attach
when the DID associated with the connection is a qualified DID. Additionally, this change also ensures that the webhook for the new connection request will only be emitted after the request has been attached to the connection record. Without this, a race condition can occur for controllers that try to accept the request before ACA-Py finishes storing the request.As a side note, I left a todo wondering out loud about whether the webhook for the newly created connection record (the one that gets generated from a multi-use connection record) should happen at all.